package com.fearless.crm.settings.service.impl;

import com.fearless.crm.settings.dao.PersonDao;
import com.fearless.crm.settings.entity.Person;
import com.fearless.crm.settings.service.PersonService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class PersonServiceImpl implements PersonService {

    @Resource
    private PersonDao personDao;

    @Override
    public List<Person> selectAll() {
        System.out.println("service的selectAll执行开始");
        List<Person> list=personDao.query();
        System.out.println("service的selectAll执行完毕");
        return list;
    }



    public int addPersonService(Person person){
        System.out.println("service的addPersonService执行开始");
        int num=personDao.addOnePerson(person);
        return num;
    }
}
